home *** CD-ROM | disk | FTP | other *** search
- /*
- IC File Map What.h
-
- */
-
- #pragma once
-
- #ifndef __H_IC_File_Map_What__
- #define __H_IC_File_Map_What__
-
- enum {
- ditChange=1,ditMainUserItem,ditAdd,ditDelete,ditList,ditSortExtension,ditSortApplication,
- ditSortName,ditDefaults
- };
-
- enum {
- ditOK=1,ditCancel,ditEditorUserItem,ditEntryName,ditExtension,ditMIMEType,ditAsciiRadio,
- ditBinaryRadio,ditMacintoshRadio,ditType,ditCreator,ditChooseExample,ditApplicationName,
- ditPost,ditPostCreator,ditPostButton,ditNotForIncoming,ditNotForOutgoing,ditAddEditDefaults
- };
-
- #define kCellHeight 36
-
- struct SmallRecordStruct {
- long position;
- Str31 key;
- };
-
- typedef struct SmallRecordStruct SmallRecord,* SmallRecordPtr;
- typedef SmallRecord** SmallArray;
- typedef SmallRecord **SmallArrayPtr,*** SmallArrayHandle;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- void DimButtons(WindowType wt);
- void LDClose(void);
- void LDDraw(Handle entries,Boolean select,Rect* r,Cell the_cell,short offset,short datalen,ListHandle lh);
- pascal void MyLDEF(short message,Boolean select,Rect* r,Cell the_cell,short offset,short datalen,ListHandle lh);
- pascal void FileMapUserItemUpdate(DialogPtr dlg,short item);
- OSErr WhatOpenFileMap(WindowType wt,short item);
- void SetRadio(DialogPtr modal,short value);
- pascal Boolean AddChangeFilter(DialogPtr dlg,EventRecord* event,short* item);
- OSErr GetMapEntriesResource(Handle* entries);
- StringPtr MapOSType(OSType ot,StringPtr str);
- OSType MapStr(StringPtr s);
- void DoChooseExample(DialogPtr modal);
- Boolean ChoosePost(ICMapEntry* entry);
- void SetPostInfo(ICMapEntry* entry,DialogPtr modal);
- void SetAllTheStuff(ICMapEntry* entry,DialogPtr modal);
- void SetAddEditDefaults(ICMapEntry* entry,DialogPtr modal);
- OSErr DoDialog(ICMapEntry* entry);
- OSErr DoAddChange(short selection,ICMapEntry* entry,Handle entries,ListHandle lh);
- OSErr SetEntriesHandle(WindowType wt,Handle entries);
- void QuickSortSmall(SmallArrayHandle small,long l,long r);
- void SmallSort(SmallArrayHandle small,long count);
-
- /*
- DoSort - Sort the list based on extension, creator, or name.
-
- Unlike the pascal version, I am using an array of pointers to control the sorting.
- Hopefully this would result in a traumatic speed increase when sorting a large list of items,
- assuming I got the translation correct.
- */
- void DoSort(WindowType wt,short item);
- void DoSetDefaults(WindowType wt);
- OSErr WhatClickFileMap(WindowType wt,short item,EventRecord* er);
- OSErr WhatFlushFileMap(WindowType wt,short item);
- OSErr WhatCloseFileMap(WindowType wt,short item);
- OSErr WhatActivateFileMap(WindowType wt,short item,Boolean activate);
- pascal StringPtr GetFileMapEntryName(ListHandle list,Cell c,StringPtr str);
- OSErr WhatKeyFileMap(WindowType wt,short item,EventRecord* er);
- OSErr WhatCursorFileMap(WindowType wt,short item,Point pt,short cursid);
- void MappingSetSelection(const StringPtr key);
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __H_IC_File_Map_What__ */
-
-
-